inherited frmPurchaseWizard: TfrmPurchaseWizard
  Left = 351
  Top = 71
  BorderIcons = [biSystemMenu, biMaximize]
  Caption = #37319#36141#25104#26412#20998#26512
  ClientHeight = 427
  ClientWidth = 1004
  ExplicitWidth = 1020
  ExplicitHeight = 466
  PixelsPerInch = 96
  TextHeight = 12
  object rzpnl1: TRzPanel [0]
    Left = 0
    Top = 387
    Width = 1004
    Height = 40
    Align = alBottom
    BorderOuter = fsNone
    TabOrder = 1
    DesignSize = (
      1004
      40)
    object btnPrior: TcxButton
      Left = 763
      Top = 8
      Width = 75
      Height = 25
      Anchors = [akRight, akBottom]
      Caption = #19978#19968#27493
      Enabled = False
      LookAndFeel.Kind = lfUltraFlat
      TabOrder = 8
      OnClick = btnPriorClick
    end
    object btnNext: TcxButton
      Left = 844
      Top = 8
      Width = 75
      Height = 25
      Anchors = [akRight, akBottom]
      Caption = #19979#19968#27493
      LookAndFeel.Kind = lfUltraFlat
      TabOrder = 9
      OnClick = btnNextClick
    end
    object btnPurOrder: TcxButton
      Tag = 110
      Left = 467
      Top = 8
      Width = 86
      Height = 25
      Anchors = [akRight, akBottom]
      Caption = #29983#25104#37319#36141#35746#21333
      LookAndFeel.Kind = lfUltraFlat
      TabOrder = 5
      Visible = False
      OnClick = btnPurOrderClick
    end
    object btnCancel: TcxButton
      Left = 924
      Top = 8
      Width = 75
      Height = 25
      Anchors = [akRight, akBottom]
      Cancel = True
      Caption = #21462#28040
      LookAndFeel.Kind = lfUltraFlat
      TabOrder = 10
      OnClick = btnCancelClick
    end
    object btnPurchase: TcxButton
      Tag = 140
      Left = 561
      Top = 8
      Width = 86
      Height = 25
      Anchors = [akRight, akBottom]
      Caption = #29983#25104#37319#36141#24320#21333
      LookAndFeel.Kind = lfUltraFlat
      TabOrder = 6
      Visible = False
      OnClick = btnPurOrderClick
    end
    object btnSelPurRequest: TcxButton
      Tag = 120
      Left = 99
      Top = 8
      Width = 86
      Height = 25
      Anchors = [akLeft, akBottom]
      Caption = #36873#25321#35831#36141#21333
      LookAndFeel.Kind = lfUltraFlat
      TabOrder = 3
      OnClick = btnSelSaleOrderClick
    end
    object btnSelSaleOrder: TcxButton
      Tag = 210
      Left = 7
      Top = 8
      Width = 86
      Height = 25
      Anchors = [akLeft, akBottom]
      Caption = #36873#25321#38144#21806#35746#21333
      LookAndFeel.Kind = lfUltraFlat
      TabOrder = 1
      OnClick = btnSelSaleOrderClick
    end
    object btnSave: TcxButton
      Tag = 140
      Left = 652
      Top = 8
      Width = 100
      Height = 25
      Anchors = [akRight, akBottom]
      Caption = #20445#23384#20026#37319#36141#35810#20215#21333
      LookAndFeel.Kind = lfUltraFlat
      TabOrder = 7
      Visible = False
      OnClick = btnSaveClick
    end
    object btnEmpty: TcxButton
      Left = 376
      Top = 8
      Width = 75
      Height = 25
      Anchors = [akRight, akBottom]
      Caption = #28165#31354
      LookAndFeel.Kind = lfUltraFlat
      TabOrder = 2
      Visible = False
      OnClick = btnEmptyClick
    end
    object btnSelAll: TcxButton
      Left = 295
      Top = 8
      Width = 75
      Height = 25
      Anchors = [akRight, akBottom]
      Caption = #20840#36873
      LookAndFeel.Kind = lfUltraFlat
      TabOrder = 0
      Visible = False
      OnClick = btnSelAllClick
    end
    object btnSelPurOrder: TcxButton
      Tag = 110
      Left = 191
      Top = 8
      Width = 86
      Height = 25
      Anchors = [akLeft, akBottom]
      Caption = #36873#25321#37319#36141#35746#21333
      LookAndFeel.Kind = lfUltraFlat
      TabOrder = 4
      OnClick = btnSelSaleOrderClick
    end
    object btnPurRequest: TcxButton
      Tag = 120
      Left = 471
      Top = 8
      Width = 86
      Height = 25
      Anchors = [akRight, akBottom]
      Caption = #29983#25104#35831#36141#21333
      LookAndFeel.Kind = lfUltraFlat
      TabOrder = 11
      Visible = False
      OnClick = btnPurOrderClick
    end
  end
  object rzpgcntrl1: TRzPageControl [1]
    Left = 0
    Top = 0
    Width = 1004
    Height = 387
    Hint = ''
    ActivePage = tbsFirst
    Align = alClient
    ParentColor = False
    TabIndex = 0
    TabOrder = 0
    OnChange = rzpgcntrl1Change
    FixedDimension = 18
    object tbsFirst: TRzTabSheet
      Caption = '    '#31532#19968#27493#12289#36873#25321#36135#21697'    '
      object edtFocus: TcxTextEdit
        Left = 60
        Top = 227
        TabOrder = 1
        Text = 'edtFocus'
        Width = 121
      end
      object grdProduct: TcxGrid
        Left = 0
        Top = 0
        Width = 1000
        Height = 365
        Align = alClient
        TabOrder = 0
        OnEnter = grdProductEnter
        object ProductView: TcxGridDBTableView
          PopupMenu = PopupMenu1
          OnMouseDown = ProductViewMouseDown
          Navigator.Buttons.CustomButtons = <>
          OnFocusedItemChanged = ProductViewFocusedItemChanged
          OnFocusedRecordChanged = ProductViewFocusedRecordChanged
          DataController.DataModeController.GridMode = True
          DataController.DataSource = ds_selproduct
          DataController.Summary.DefaultGroupSummaryItems = <>
          DataController.Summary.FooterSummaryItems = <>
          DataController.Summary.SummaryGroups = <>
          OptionsBehavior.FocusCellOnTab = True
          OptionsBehavior.FocusFirstCellOnNewRecord = True
          OptionsBehavior.GoToNextCellOnEnter = True
          OptionsBehavior.FocusCellOnCycle = True
          OptionsData.Appending = True
          OptionsView.ScrollBars = ssVertical
          OptionsView.ColumnAutoWidth = True
          OptionsView.GroupByBox = False
          OptionsView.Indicator = True
          OptionsView.IndicatorWidth = 30
          Styles.Background = MainDM.bslBackGroup
          Styles.ContentEven = MainDM.bsEven
          Styles.ContentOdd = MainDM.bsOdd
          Styles.Footer = MainDM.bsTitle
          Styles.Header = MainDM.bsTitle
          Styles.Selection = MainDM.bsSelect
          OnCustomDrawIndicatorCell = ProductViewCustomDrawIndicatorCell
          OnLeftPosChanged = ProductViewLeftPosChanged
          object ProductViewcode: TcxGridDBColumn
            DataBinding.FieldName = 'code'
            HeaderAlignmentHorz = taCenter
            Width = 99
          end
          object ProductViewname: TcxGridDBColumn
            DataBinding.FieldName = 'ProductID'
            HeaderAlignmentHorz = taCenter
            Width = 127
          end
          object ProductViewunitname: TcxGridDBColumn
            DataBinding.FieldName = 'unitname'
            PropertiesClassName = 'TcxComboBoxProperties'
            OnGetPropertiesForEdit = ProductViewunitnameGetPropertiesForEdit
            HeaderAlignmentHorz = taCenter
            Width = 77
          end
          object ProductViewOrd_Qty: TcxGridDBColumn
            DataBinding.FieldName = 'Ord_Qty'
            HeaderAlignmentHorz = taCenter
            Width = 110
          end
          object ProductViewbtypename: TcxGridDBColumn
            DataBinding.FieldName = 'btypename'
            HeaderAlignmentHorz = taCenter
            Width = 98
          end
          object ProductViewbdate: TcxGridDBColumn
            DataBinding.FieldName = 'bdate'
            HeaderAlignmentHorz = taCenter
            Width = 78
          end
          object ProductViewbcode: TcxGridDBColumn
            DataBinding.FieldName = 'bcode'
            HeaderAlignmentHorz = taCenter
            Width = 140
          end
          object ProductViewbillquantity: TcxGridDBColumn
            DataBinding.FieldName = 'billquantity'
            HeaderAlignmentHorz = taCenter
            Width = 99
          end
        end
        object ProductLevel: TcxGridLevel
          GridView = ProductView
        end
      end
    end
    object tbsSecond: TRzTabSheet
      Caption = '    '#31532#20108#27493#12289#20379#24212#21830#25253#20215'    '
      ExplicitLeft = 0
      ExplicitTop = 0
      ExplicitWidth = 768
      ExplicitHeight = 345
      object grdListPrice: TcxGrid
        Left = 0
        Top = 41
        Width = 1000
        Height = 91
        Align = alClient
        TabOrder = 1
        ExplicitWidth = 768
        ExplicitHeight = 71
        object ListPriceView: TcxGridDBTableView
          PopupMenu = PopupMenu1
          OnDblClick = ListPriceViewDblClick
          Navigator.Buttons.CustomButtons = <>
          DataController.DataSource = ds_selproduct
          DataController.Summary.DefaultGroupSummaryItems = <>
          DataController.Summary.FooterSummaryItems = <>
          DataController.Summary.SummaryGroups = <>
          OptionsBehavior.AlwaysShowEditor = True
          OptionsData.Inserting = False
          OptionsView.ColumnAutoWidth = True
          OptionsView.GroupByBox = False
          OptionsView.Indicator = True
          OptionsView.IndicatorWidth = 30
          Styles.Background = MainDM.bslBackGroup
          Styles.ContentEven = MainDM.bsEven
          Styles.ContentOdd = MainDM.bsOdd
          Styles.Footer = MainDM.bsTitle
          Styles.Header = MainDM.bsTitle
          Styles.Selection = MainDM.bsSelect
          OnCustomDrawIndicatorCell = ProductViewCustomDrawIndicatorCell
          OnLeftPosChanged = ListPriceViewLeftPosChanged
          object ListPriceViewctrlkind: TcxGridDBColumn
            DataBinding.FieldName = 'ctrlkind'
            HeaderAlignmentHorz = taCenter
            Options.Editing = False
            Width = 97
          end
          object ListPriceViewp_name: TcxGridDBColumn
            DataBinding.FieldName = 'name'
            HeaderAlignmentHorz = taCenter
            Options.Editing = False
            Width = 127
          end
          object ListPriceViewp_code: TcxGridDBColumn
            DataBinding.FieldName = 'code'
            HeaderAlignmentHorz = taCenter
            Options.Editing = False
            Width = 121
          end
          object ListPriceViewunitname: TcxGridDBColumn
            DataBinding.FieldName = 'unitname'
            HeaderAlignmentHorz = taCenter
            Options.Editing = False
            Width = 71
          end
          object ListPriceViewt_name: TcxGridDBColumn
            DataBinding.FieldName = 'traderid'
            HeaderAlignmentHorz = taCenter
            Width = 146
          end
          object ListPriceViewt_code: TcxGridDBColumn
            DataBinding.FieldName = 't_code'
            HeaderAlignmentHorz = taCenter
            Options.Editing = False
            Width = 138
          end
          object ListPriceViewmoneyname: TcxGridDBColumn
            Caption = #24065#31181
            DataBinding.FieldName = 'moneyid'
            HeaderAlignmentHorz = taCenter
            Width = 80
          end
          object ListPriceViewexchrate: TcxGridDBColumn
            Caption = #27719#29575
            DataBinding.FieldName = 'exchrate'
            HeaderAlignmentHorz = taCenter
          end
          object ListPriceViewprice: TcxGridDBColumn
            DataBinding.FieldName = 'price'
            HeaderAlignmentHorz = taCenter
            Width = 63
          end
          object ListPriceViewdcprice: TcxGridDBColumn
            DataBinding.FieldName = 'dcprice'
            HeaderAlignmentHorz = taCenter
            Options.Editing = False
          end
          object ListPriceViewqty: TcxGridDBColumn
            DataBinding.FieldName = 'Ord_Qty'
            HeaderAlignmentHorz = taCenter
            Options.Editing = False
            Width = 65
          end
        end
        object ListPriceLevel: TcxGridLevel
          GridView = ListPriceView
        end
      end
      object Panel1: TPanel
        Left = 0
        Top = 0
        Width = 1000
        Height = 41
        Align = alTop
        BevelOuter = bvNone
        TabOrder = 0
        DesignSize = (
          1000
          41)
        object rbLately: TcxRadioButton
          Left = 88
          Top = 12
          Width = 100
          Height = 17
          Caption = #26368#36817#37319#36141#20215
          Checked = True
          TabOrder = 1
          TabStop = True
          Transparent = True
        end
        object rbLow: TcxRadioButton
          Left = 211
          Top = 12
          Width = 100
          Height = 17
          Caption = #26368#20302#37319#36141#20215
          TabOrder = 2
          Transparent = True
        end
        object rbDefTrader: TcxRadioButton
          Left = 333
          Top = 12
          Width = 100
          Height = 17
          Caption = #40664#35748#20379#24212#21830
          TabOrder = 4
          Transparent = True
        end
        object btnFind: TcxButton
          Left = 904
          Top = 8
          Width = 75
          Height = 25
          Anchors = [akTop, akRight]
          Caption = #33258#21160#21305#37197
          TabOrder = 0
          OnClick = btnFindClick
          ExplicitLeft = 860
        end
        object cxLabel1: TcxLabel
          Left = 20
          Top = 12
          Caption = #20248#20808#21305#37197
          Transparent = True
        end
      end
      object pgcInfo: TcxPageControl
        Left = 0
        Top = 140
        Width = 1000
        Height = 225
        Align = alBottom
        TabOrder = 4
        Properties.ActivePage = cxTabSheet1
        Properties.CustomButtons.Buttons = <>
        OnChange = pgcInfoChange
        ExplicitTop = 120
        ExplicitWidth = 768
        ClientRectBottom = 221
        ClientRectLeft = 4
        ClientRectRight = 996
        ClientRectTop = 24
        object cxTabSheet1: TcxTabSheet
          Caption = #30456#20851#20379#24212#21830
          ImageIndex = 0
          ExplicitLeft = 0
          ExplicitTop = 0
          ExplicitWidth = 768
          ExplicitHeight = 0
          object grdInfo: TcxGrid
            Left = 0
            Top = 0
            Width = 1000
            Height = 202
            Align = alClient
            TabOrder = 0
            LookAndFeel.NativeStyle = False
            ExplicitWidth = 768
            object grdInfoView1: TcxGridDBTableView
              Navigator.Buttons.CustomButtons = <>
              DataController.DataSource = dstrader
              DataController.Summary.DefaultGroupSummaryItems = <>
              DataController.Summary.FooterSummaryItems = <>
              DataController.Summary.SummaryGroups = <>
              OptionsData.Editing = False
              OptionsView.ColumnAutoWidth = True
              OptionsView.GroupByBox = False
              Styles.Background = MainDM.bslBackGroup
              Styles.ContentEven = MainDM.bsEven
              Styles.ContentOdd = MainDM.bsOdd
              Styles.Footer = MainDM.bsTitle
              Styles.Header = MainDM.bsTitle
              Styles.Selection = MainDM.bsSelect
              object grdInfoView1ctrlkind: TcxGridDBColumn
                DataBinding.FieldName = 'ctrlkind'
                HeaderAlignmentHorz = taCenter
                Width = 113
              end
              object grdInfoView1t_name: TcxGridDBColumn
                DataBinding.FieldName = 't_name'
                HeaderAlignmentHorz = taCenter
                Width = 163
              end
              object grdInfoView1t_code: TcxGridDBColumn
                DataBinding.FieldName = 't_code'
                HeaderAlignmentHorz = taCenter
                Width = 87
              end
              object grdInfoView1p_name: TcxGridDBColumn
                DataBinding.FieldName = 'p_name'
                HeaderAlignmentHorz = taCenter
                Width = 178
              end
              object grdInfoView1p_code: TcxGridDBColumn
                DataBinding.FieldName = 'p_code'
                HeaderAlignmentHorz = taCenter
                Width = 134
              end
              object grdInfoView1unitname: TcxGridDBColumn
                DataBinding.FieldName = 'unitname'
                HeaderAlignmentHorz = taCenter
                Width = 69
              end
              object grdInfoView1price: TcxGridDBColumn
                DataBinding.FieldName = 'price'
                HeaderAlignmentHorz = taCenter
                Width = 114
              end
            end
            object grdInfoLevel1: TcxGridLevel
              Caption = #30456#20851#20379#24212#21830
              GridView = grdInfoView1
              Options.DetailTabsPosition = dtpLeft
            end
          end
        end
        object cxTabSheet2: TcxTabSheet
          Caption = #20379#24212#21830#20379#36135#35760#24405
          ImageIndex = 1
          ExplicitLeft = 0
          ExplicitTop = 0
          ExplicitWidth = 768
          ExplicitHeight = 0
          object grdHistory: TcxGrid
            Left = 0
            Top = 0
            Width = 1000
            Height = 202
            Align = alClient
            TabOrder = 0
            ExplicitWidth = 768
            object HistoryView: TcxGridDBTableView
              Navigator.Buttons.CustomButtons = <>
              DataController.DataSource = ds_trade_history
              DataController.Summary.DefaultGroupSummaryItems = <>
              DataController.Summary.FooterSummaryItems = <>
              DataController.Summary.SummaryGroups = <>
              OptionsData.CancelOnExit = False
              OptionsData.Deleting = False
              OptionsData.DeletingConfirmation = False
              OptionsData.Editing = False
              OptionsData.Inserting = False
              OptionsView.ColumnAutoWidth = True
              OptionsView.GroupByBox = False
              Styles.Background = MainDM.bslBackGroup
              Styles.ContentEven = bsEven
              Styles.ContentOdd = bsOdd
              Styles.Footer = bsTitle
              Styles.Header = bsTitle
              Styles.Selection = bsSelect
              object cxgrdbclmnGrid2DBTableView1bid: TcxGridDBColumn
                DataBinding.FieldName = 'bcode'
                HeaderAlignmentHorz = taCenter
                Width = 140
              end
              object cxgrdbclmnGrid2DBTableView1bdate: TcxGridDBColumn
                Caption = #21333#25454#26085#26399
                DataBinding.FieldName = 'bdate'
                HeaderAlignmentHorz = taCenter
                Width = 128
              end
              object cxgrdbclmnGrid2DBTableView1tid: TcxGridDBColumn
                Caption = #20379#24212#21830#32534#30721
                DataBinding.FieldName = 't_code'
                HeaderAlignmentHorz = taCenter
                Width = 72
              end
              object cxgrdbclmnGrid2DBTableView1tname: TcxGridDBColumn
                DataBinding.FieldName = 't_name'
                HeaderAlignmentHorz = taCenter
                Width = 101
              end
              object cxgrdbclmnGrid2DBTableView1productid: TcxGridDBColumn
                DataBinding.FieldName = 'p_code'
                HeaderAlignmentHorz = taCenter
                Width = 88
              end
              object cxgrdbclmnGrid2DBTableView1productname: TcxGridDBColumn
                DataBinding.FieldName = 'p_name'
                HeaderAlignmentHorz = taCenter
                Width = 144
              end
              object HistoryViewunitname: TcxGridDBColumn
                DataBinding.FieldName = 'unitname'
                HeaderAlignmentHorz = taCenter
                Width = 70
              end
              object cxgrdbclmnGrid2DBTableView1price: TcxGridDBColumn
                Caption = #21333#20215
                DataBinding.FieldName = 'price'
                HeaderAlignmentHorz = taCenter
                Width = 115
              end
            end
            object HistoryLevel: TcxGridLevel
              GridView = HistoryView
            end
          end
        end
      end
      object cxSplitter1: TcxSplitter
        Left = 0
        Top = 132
        Width = 1000
        Height = 8
        Cursor = crHandPoint
        HotZoneClassName = 'TcxXPTaskBarStyle'
        AlignSplitter = salBottom
        Control = pgcInfo
        ExplicitTop = 112
        ExplicitWidth = 768
      end
      object pnlSplitProduct: TPanel
        Left = 176
        Top = 68
        Width = 389
        Height = 145
        TabOrder = 2
        Visible = False
        DesignSize = (
          389
          145)
        object btnSplit: TcxButton
          Left = 216
          Top = 104
          Width = 75
          Height = 25
          Anchors = [akRight, akBottom]
          Caption = #30830#23450
          Default = True
          TabOrder = 3
          OnClick = btnSplitClick
        end
        object btnCancelSplit: TcxButton
          Left = 300
          Top = 104
          Width = 75
          Height = 25
          Anchors = [akRight, akBottom]
          Caption = #21462#28040
          TabOrder = 8
          OnClick = btnCancelSplitClick
        end
        object lblSplitProduct: TcxLabel
          Left = 24
          Top = 24
          Caption = #25286#20998#36135#21697
          Transparent = True
        end
        object edtPrice: TcxSpinEdit
          Left = 291
          Top = 68
          TabOrder = 2
          Width = 80
        end
        object edtQuantity: TcxSpinEdit
          Left = 193
          Top = 68
          TabOrder = 1
          Width = 80
        end
        object edtTrader: TcxDBLookupComboBox
          Tag = 9
          Left = 24
          Top = 68
          DataBinding.DataField = 'traderid'
          DataBinding.DataSource = dsSplit
          Properties.ListColumns = <>
          TabOrder = 0
          Width = 145
        end
        object cxLabel2: TcxLabel
          Left = 24
          Top = 52
          Caption = #20379#24212#21830
          Transparent = True
        end
        object cxLabel3: TcxLabel
          Left = 193
          Top = 52
          Caption = #25286#20998#25968#37327
          Transparent = True
        end
        object cxLabel4: TcxLabel
          Left = 291
          Top = 52
          Caption = #21333#20215
          Transparent = True
        end
      end
    end
    object tbsThird: TRzTabSheet
      Caption = '    '#31532#19977#27493#12289#37319#36141#24314#35758
      ExplicitLeft = 0
      ExplicitTop = 0
      ExplicitWidth = 768
      ExplicitHeight = 345
      object grdBillDtl: TcxGrid
        Left = 273
        Top = 0
        Width = 727
        Height = 365
        Align = alClient
        TabOrder = 2
        ExplicitWidth = 495
        ExplicitHeight = 345
        object BillDtlView: TcxGridDBTableView
          Navigator.Buttons.CustomButtons = <>
          DataController.DataSource = ds_selproduct
          DataController.Summary.DefaultGroupSummaryItems = <>
          DataController.Summary.FooterSummaryItems = <>
          DataController.Summary.SummaryGroups = <>
          OptionsData.CancelOnExit = False
          OptionsData.Deleting = False
          OptionsData.DeletingConfirmation = False
          OptionsData.Inserting = False
          OptionsView.ColumnAutoWidth = True
          OptionsView.GroupByBox = False
          Styles.Background = MainDM.bslBackGroup
          Styles.ContentEven = MainDM.bsEven
          Styles.ContentOdd = MainDM.bsOdd
          Styles.Footer = MainDM.bsTitle
          Styles.Header = MainDM.bsTitle
          Styles.Selection = MainDM.bsSelect
          object BillDtlViewchoice: TcxGridDBColumn
            DataBinding.FieldName = 'choice'
            PropertiesClassName = 'TcxCheckBoxProperties'
            Properties.ImmediatePost = True
            HeaderAlignmentHorz = taCenter
            Width = 40
          end
          object BillDtlViewcode: TcxGridDBColumn
            DataBinding.FieldName = 'code'
            HeaderAlignmentHorz = taCenter
            Options.Editing = False
            Options.Focusing = False
            Width = 130
          end
          object BillDtlViewname: TcxGridDBColumn
            DataBinding.FieldName = 'name'
            HeaderAlignmentHorz = taCenter
            Options.Editing = False
            Options.Focusing = False
            Width = 147
          end
          object BillDtlViewunitname: TcxGridDBColumn
            DataBinding.FieldName = 'unitname'
            HeaderAlignmentHorz = taCenter
            Options.Editing = False
            Options.Focusing = False
            Width = 53
          end
          object BillDtlViewOrd_Qty: TcxGridDBColumn
            DataBinding.FieldName = 'Ord_Qty'
            HeaderAlignmentHorz = taCenter
            Options.Editing = False
            Options.Focusing = False
            Width = 72
          end
          object BillDtlViewprice: TcxGridDBColumn
            DataBinding.FieldName = 'price'
            HeaderAlignmentHorz = taCenter
            Options.Editing = False
            Options.Focusing = False
            Width = 72
          end
          object BillDtlViewamount: TcxGridDBColumn
            DataBinding.FieldName = 'amount'
            HeaderAlignmentHorz = taCenter
            Options.Editing = False
            Options.Focusing = False
            Width = 71
          end
          object BillDtlViewdcprice: TcxGridDBColumn
            DataBinding.FieldName = 'dcprice'
            HeaderAlignmentHorz = taCenter
            Width = 60
          end
          object BillDtlViewdcamount: TcxGridDBColumn
            DataBinding.FieldName = 'dcamount'
            HeaderAlignmentHorz = taCenter
            Width = 60
          end
        end
        object BillDtlLevel: TcxGridLevel
          GridView = BillDtlView
        end
      end
      object grdBill: TcxGrid
        Left = 0
        Top = 0
        Width = 265
        Height = 365
        Align = alLeft
        TabOrder = 0
        ExplicitHeight = 345
        object BillView: TcxGridDBTableView
          Navigator.Buttons.CustomButtons = <>
          DataController.DataSource = dsBill
          DataController.Summary.DefaultGroupSummaryItems = <>
          DataController.Summary.FooterSummaryItems = <>
          DataController.Summary.SummaryGroups = <>
          OptionsView.ColumnAutoWidth = True
          OptionsView.GroupByBox = False
          Styles.Background = MainDM.bslBackGroup
          Styles.ContentEven = MainDM.bsEven
          Styles.ContentOdd = MainDM.bsOdd
          Styles.Footer = MainDM.bsTitle
          Styles.Header = MainDM.bsTitle
          Styles.Selection = MainDM.bsSelect
          object BillViewchoice: TcxGridDBColumn
            DataBinding.FieldName = 'choice'
            PropertiesClassName = 'TcxCheckBoxProperties'
            Properties.ImmediatePost = True
            Width = 33
          end
          object BillViewt_code: TcxGridDBColumn
            DataBinding.FieldName = 't_code'
            Options.Editing = False
            Options.Focusing = False
            Width = 92
          end
          object BillViewt_name: TcxGridDBColumn
            DataBinding.FieldName = 't_name'
            Options.Editing = False
            Options.Focusing = False
            Width = 138
          end
          object BillViewmoneyname: TcxGridDBColumn
            Caption = #24065#31181
            DataBinding.FieldName = 'moneyid'
            Width = 60
          end
          object BillViewexchrate: TcxGridDBColumn
            Caption = #27719#29575
            DataBinding.FieldName = 'exchrate'
            Width = 50
          end
        end
        object BillLevel: TcxGridLevel
          GridView = BillView
        end
      end
      object cxSplitter2: TcxSplitter
        Left = 265
        Top = 0
        Width = 8
        Height = 365
        HotZoneClassName = 'TcxXPTaskBarStyle'
        Control = grdBill
        OnMoved = cxSplitter2Moved
        ExplicitHeight = 345
      end
    end
  end
  object qry_trader: TUniQuery
    Connection = MainDM.UniConn
    SQL.Strings = (
      
        'select '#39#26368#20302#37319#36141#20215#39' as ctrlkind, cp.productid,cp.unitid,cp.qty,cp.bty' +
        'pe,cp.bid,cp,bno,'
      
        '    tp.price,  p.name p_name,p.code p_code,u.unitname,t.name t_n' +
        'ame,t.code t_code'
      
        '       from tb_purctrl cp left join tt_traderprice tp on cp.prod' +
        'uctid=tp.productid and cp.unitid=tp.unitid'
      '       join td_product p on cp.productid=p.p_id'
      '       join td_unitprice u on cp.unitid=u.unitid'
      '       left join td_trader t on tp.traderid=t.traderid')
    CachedUpdates = True
    Options.SetFieldsReadOnly = False
    Options.RequiredFields = False
    Options.QueryRecCount = True
    Left = 280
    Top = 188
    object qry_traderctrlkind: TStringField
      DisplayLabel = #25253#20215#31867#22411
      FieldName = 'ctrlkind'
      ReadOnly = True
      Size = 10
    end
    object qry_traderproductid: TIntegerField
      FieldName = 'productid'
    end
    object qry_traderunitid: TIntegerField
      FieldName = 'unitid'
    end
    object qry_traderqty: TFloatField
      DisplayLabel = #35746#36141#25968#37327
      FieldName = 'qty'
    end
    object qry_traderp_name: TWideStringField
      DisplayLabel = #36135#21697#21517#31216
      FieldName = 'p_name'
      Size = 60
    end
    object qry_traderp_code: TStringField
      DisplayLabel = #36135#21697#32534#30721
      FieldName = 'p_code'
      Size = 30
    end
    object qry_traderunitname: TWideStringField
      DisplayLabel = #21333#20301
      FieldName = 'unitname'
      Size = 30
    end
    object qry_tradert_name: TWideStringField
      DisplayLabel = #20379#24212#21830#21517#31216
      FieldName = 't_name'
      Size = 80
    end
    object qry_tradert_code: TWideStringField
      DisplayLabel = #20379#24212#21830#32534#30721
      FieldName = 't_code'
      Size = 40
    end
    object qry_traderprice: TFloatField
      DisplayLabel = #37319#36141#20215
      FieldName = 'price'
    end
    object qry_traderckind: TIntegerField
      FieldName = 'ckind'
    end
    object qry_tradertraderid: TIntegerField
      FieldName = 'traderid'
    end
    object qry_tradermoneyid: TIntegerField
      FieldName = 'moneyid'
    end
    object qry_tradermoneyname: TStringField
      FieldName = 'moneyname'
      Size = 60
    end
    object qry_traderexchrate: TFloatField
      FieldName = 'exchrate'
    end
    object qry_traderdcprice: TFloatField
      FieldName = 'dcprice'
    end
  end
  object qry_trader_history: TUniQuery
    Connection = MainDM.UniConn
    SQL.Strings = (
      'select t.*,v.traderid from tt_bill t'
      '         left join tb_purvalue v on t.bid=v.bid and t.btype=130'
      
        '         where v.traderid=2 and productid=2 and unitid=12 and bt' +
        'ype=130'
      '         union all '
      '        select t.*,v.traderid from tt_bill t'
      '         left join tb_purchase v on t.bid=v.bid and t.btype=140'
      
        '         where v.traderid=2 and productid=2 and unitid=12 and bt' +
        'ype=140'
      '         order by t.bdate desc,tid desc')
    CachedUpdates = True
    Options.SetFieldsReadOnly = False
    Options.RequiredFields = False
    Options.QueryRecCount = True
    Left = 280
    Top = 244
    object qry_trader_historybid: TIntegerField
      FieldName = 'bid'
    end
    object qry_trader_historybcode: TStringField
      DisplayLabel = #21333#25454#32534#21495
      FieldName = 'bcode'
    end
    object qry_trader_historybdate: TDateTimeField
      FieldName = 'bdate'
    end
    object qry_trader_historytraderid: TIntegerField
      FieldName = 'traderid'
    end
    object qry_trader_historyt_code: TWideStringField
      FieldName = 't_code'
      Size = 30
    end
    object qry_trader_historyt_name: TWideStringField
      DisplayLabel = #20379#24212#21830#21517#31216
      FieldName = 't_name'
      Size = 80
    end
    object qry_trader_historyproductid: TIntegerField
      FieldName = 'productid'
    end
    object qry_trader_historyp_name: TWideStringField
      DisplayLabel = #36135#21697#21517#31216
      FieldName = 'p_name'
      Size = 60
    end
    object qry_trader_historyp_code: TStringField
      DisplayLabel = #36135#21697#32534#30721
      FieldName = 'p_code'
      Size = 30
    end
    object qry_trader_historyprice: TFloatField
      FieldName = 'price'
    end
    object qry_trader_historyamount: TFloatField
      FieldName = 'amount'
    end
    object qry_trader_historyquantity: TFloatField
      FieldName = 'quantity'
    end
    object qry_trader_historyunitname: TWideStringField
      DisplayLabel = #21333#20301
      FieldName = 'unitname'
      Size = 80
    end
  end
  object ds_trade_history: TDataSource
    DataSet = qry_trader_history
    Left = 388
    Top = 236
  end
  object cds_sel_product: TClientDataSet
    Aggregates = <>
    Params = <>
    AfterScroll = cds_sel_productAfterScroll
    OnNewRecord = cds_sel_productNewRecord
    Left = 544
    Top = 168
    object cds_sel_productchoice: TBooleanField
      DisplayLabel = #36873#25321
      FieldName = 'choice'
    end
    object cds_sel_productProductID: TIntegerField
      DisplayLabel = #36135#21697#21517#31216
      FieldName = 'ProductID'
      OnChange = cds_sel_productProductIDChange
    end
    object cds_sel_productcode: TStringField
      DisplayLabel = #36135#21697#32534#30721
      FieldName = 'code'
      Size = 50
    end
    object cds_sel_productname: TStringField
      DisplayLabel = #36135#21697#21517#31216
      FieldName = 'name'
      Size = 50
    end
    object cds_sel_productOrd_Qty: TIntegerField
      DisplayLabel = #35746#36141#25968#37327
      FieldName = 'Ord_Qty'
      OnChange = cds_sel_productOrd_QtyChange
    end
    object cds_sel_productbtype: TIntegerField
      FieldName = 'btype'
    end
    object cds_sel_productbcode: TStringField
      DisplayLabel = #21333#25454#32534#21495
      FieldName = 'bcode'
      Size = 60
    end
    object cds_sel_productbid: TIntegerField
      FieldName = 'bid'
    end
    object cds_sel_productbno: TIntegerField
      FieldName = 'bno'
    end
    object cds_sel_productbtypename: TStringField
      DisplayLabel = #21333#25454#21517#31216
      FieldName = 'btypename'
      Size = 60
    end
    object cds_sel_productunitid: TIntegerField
      FieldName = 'unitid'
      OnChange = cds_sel_productunitidChange
    end
    object cds_sel_productunitname: TStringField
      DisplayLabel = #21333#20301
      FieldName = 'unitname'
      Size = 60
    end
    object cds_sel_productbdate: TDateField
      DisplayLabel = #21333#25454#26085#26399
      FieldName = 'bdate'
    end
    object cds_sel_productbquantity: TFloatField
      FieldName = 'bquantity'
    end
    object cds_sel_productbillquantity: TFloatField
      DisplayLabel = #21333#25454#25968#37327
      FieldName = 'billquantity'
    end
    object cds_sel_productunitrate: TFloatField
      FieldName = 'unitrate'
    end
    object cds_sel_productt_name: TWideStringField
      DisplayLabel = #20379#24212#21830#21517#31216
      FieldName = 't_name'
      Size = 60
    end
    object cds_sel_productt_code: TWideStringField
      DisplayLabel = #20379#24212#21830#32534#30721
      FieldName = 't_code'
      Size = 30
    end
    object cds_sel_producttraderid: TIntegerField
      DisplayLabel = #20379#24212#21830#21517#31216
      FieldName = 'traderid'
      OnChange = cds_sel_producttraderidChange
    end
    object cds_sel_productctrlkind: TStringField
      DisplayLabel = #25253#20215#31867#22411
      FieldName = 'ctrlkind'
      Size = 30
    end
    object cds_sel_productmoneyid: TIntegerField
      FieldName = 'moneyid'
      OnChange = cds_sel_productmoneyidChange
    end
    object cds_sel_productmoneyname: TStringField
      DisplayLabel = #24065#31181
      FieldName = 'moneyname'
      Size = 60
    end
    object cds_sel_productexchrate: TFloatField
      FieldName = 'exchrate'
      OnChange = cds_sel_productexchrateChange
    end
    object cds_sel_productprice: TFloatField
      DisplayLabel = #20215#26684
      FieldName = 'price'
      OnChange = cds_sel_productpriceChange
    end
    object cds_sel_productamount: TFloatField
      DisplayLabel = #37329#39069
      FieldName = 'amount'
    end
    object cds_sel_productdcprice: TFloatField
      DisplayLabel = #20215#26684'('#26412')'
      FieldName = 'dcprice'
    end
    object cds_sel_productdcamount: TFloatField
      DisplayLabel = #37329#39069'('#26412')'
      FieldName = 'dcamount'
    end
    object cds_sel_productcustom1: TStringField
      FieldName = 'custom1'
      Size = 200
    end
    object cds_sel_productcustom2: TStringField
      FieldName = 'custom2'
      Size = 200
    end
    object cds_sel_productcustom3: TStringField
      FieldName = 'custom3'
      Size = 200
    end
    object cds_sel_productcustom4: TStringField
      FieldName = 'custom4'
      Size = 200
    end
    object cds_sel_productcustom5: TStringField
      FieldName = 'custom5'
      Size = 200
    end
    object cds_sel_productcustom6: TStringField
      FieldName = 'custom6'
      Size = 200
    end
    object cds_sel_productcustom7: TStringField
      FieldName = 'custom7'
      Size = 200
    end
    object cds_sel_productcustom8: TStringField
      FieldName = 'custom8'
      Size = 200
    end
    object cds_sel_productcustom9: TStringField
      FieldName = 'custom9'
      Size = 200
    end
    object cds_sel_productcustom10: TStringField
      FieldName = 'custom10'
      Size = 200
    end
    object cds_sel_productcustom11: TFloatField
      FieldName = 'custom11'
    end
    object cds_sel_productcustom12: TFloatField
      FieldName = 'custom12'
    end
    object cds_sel_productcustom13: TFloatField
      FieldName = 'custom13'
    end
    object cds_sel_productcustom14: TFloatField
      FieldName = 'custom14'
    end
    object cds_sel_productcustom15: TFloatField
      FieldName = 'custom15'
    end
    object cds_sel_productlength: TFloatField
      FieldName = 'length'
    end
    object cds_sel_productwidth: TFloatField
      FieldName = 'width'
    end
    object cds_sel_productheight: TFloatField
      FieldName = 'height'
    end
  end
  object ds_selproduct: TDataSource
    DataSet = cds_sel_product
    Left = 640
    Top = 168
  end
  object dsBill: TDataSource
    DataSet = cdsBill
    Left = 392
    Top = 292
  end
  object PopupMenu1: TPopupMenu
    OnPopup = PopupMenu1Popup
    Left = 289
    Top = 83
    object muAppendProduct: TMenuItem
      Caption = #26032#22686#36135#21697
      OnClick = muAppendProductClick
    end
    object muDeleteProduct: TMenuItem
      Caption = #21024#38500#36135#21697
      OnClick = muDeleteProductClick
    end
    object muSplitProduct: TMenuItem
      Caption = #25286#20998#36135#21697
      OnClick = muSplitProductClick
    end
  end
  object cxStyleRepository1: TcxStyleRepository
    Left = 64
    Top = 273
    PixelsPerInch = 96
    object bsSelect: TcxStyle
      AssignedValues = [svColor, svFont, svTextColor]
      Color = clWindow
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clActiveCaption
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      TextColor = clActiveCaption
    end
    object bsNormal: TcxStyle
      AssignedValues = [svColor, svFont, svTextColor]
      Color = clWindow
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      TextColor = clDefault
    end
    object bsOdd: TcxStyle
    end
    object bsEven: TcxStyle
    end
    object bsTitle: TcxStyle
    end
  end
  object dstrader: TDataSource
    DataSet = cdsTrader
    Left = 153
    Top = 387
  end
  object cdsBill: TClientDataSet
    Aggregates = <>
    Params = <>
    AfterScroll = cdsBillAfterScroll
    Left = 325
    Top = 295
    object cdsBillchoice: TBooleanField
      DisplayLabel = #36873#25321
      FieldName = 'choice'
      OnChange = cdsBillchoiceChange
    end
    object cdsBilltraderid: TIntegerField
      FieldName = 'traderid'
    end
    object cdsBillt_name: TWideStringField
      DisplayLabel = #20379#24212#21830#21517#31216
      FieldName = 't_name'
      Size = 60
    end
    object cdsBillt_code: TWideStringField
      DisplayLabel = #20379#24212#21830#32534#30721
      FieldName = 't_code'
      Size = 30
    end
    object cdsBillmoneyid: TIntegerField
      FieldName = 'moneyid'
    end
    object cdsBillmoneyname: TStringField
      FieldName = 'moneyname'
      Size = 60
    end
    object cdsBillexchrate: TFloatField
      FieldName = 'exchrate'
    end
  end
  object cdsSplit: TClientDataSet
    Aggregates = <>
    Params = <>
    Left = 201
    Top = 159
    object cdsSplitchoice: TBooleanField
      DisplayLabel = #36873#25321
      FieldName = 'choice'
    end
    object cdsSplitProductID: TIntegerField
      DisplayLabel = #36135#21697#21517#31216
      FieldName = 'ProductID'
      OnChange = cds_sel_productProductIDChange
    end
    object cdsSplitcode: TStringField
      DisplayLabel = #36135#21697#32534#30721
      FieldName = 'code'
      Size = 50
    end
    object cdsSplitname: TStringField
      DisplayLabel = #36135#21697#21517#31216
      FieldName = 'name'
      Size = 50
    end
    object cdsSplitOrd_Qty: TIntegerField
      DisplayLabel = #35746#36141#25968#37327
      FieldName = 'Ord_Qty'
      OnChange = cds_sel_productOrd_QtyChange
    end
    object cdsSplitbtype: TIntegerField
      FieldName = 'btype'
    end
    object cdsSplitbcode: TStringField
      DisplayLabel = #21333#25454#32534#21495
      FieldName = 'bcode'
      Size = 60
    end
    object cdsSplitbid: TIntegerField
      FieldName = 'bid'
    end
    object cdsSplitbno: TIntegerField
      FieldName = 'bno'
    end
    object cdsSplitbtypename: TStringField
      DisplayLabel = #21333#25454#21517#31216
      FieldName = 'btypename'
      Size = 60
    end
    object cdsSplitunitid: TIntegerField
      FieldName = 'unitid'
      OnChange = cds_sel_productunitidChange
    end
    object cdsSplitunitname: TStringField
      DisplayLabel = #21333#20301
      FieldName = 'unitname'
      Size = 60
    end
    object cdsSplitbdate: TDateField
      DisplayLabel = #21333#25454#26085#26399
      FieldName = 'bdate'
    end
    object cdsSplitbquantity: TFloatField
      FieldName = 'bquantity'
    end
    object cdsSplitbillquantity: TFloatField
      DisplayLabel = #21333#25454#25968#37327
      FieldName = 'billquantity'
    end
    object cdsSplitunitrate: TFloatField
      FieldName = 'unitrate'
    end
    object cdsSplitt_name: TWideStringField
      DisplayLabel = #20379#24212#21830#21517#31216
      FieldName = 't_name'
      Size = 60
    end
    object cdsSplitt_code: TWideStringField
      DisplayLabel = #20379#24212#21830#32534#30721
      FieldName = 't_code'
      Size = 30
    end
    object cdsSplittraderid: TIntegerField
      DisplayLabel = #20379#24212#21830#21517#31216
      FieldName = 'traderid'
      OnChange = cds_sel_producttraderidChange
    end
    object cdsSplitctrlkind: TStringField
      DisplayLabel = #25253#20215#31867#22411
      FieldName = 'ctrlkind'
      Size = 30
    end
    object cdsSplitprice: TFloatField
      DisplayLabel = #20215#26684
      FieldName = 'price'
    end
    object cdsSplitamount: TFloatField
      DisplayLabel = #37329#39069
      FieldName = 'amount'
    end
    object cdsSplitmoneyid: TIntegerField
      FieldName = 'moneyid'
    end
  end
  object dsSplit: TDataSource
    DataSet = cdsSplit
    Left = 257
    Top = 159
  end
  object cdsTrader: TClientDataSet
    Aggregates = <>
    Params = <>
    Left = 93
    Top = 386
    object cdsTraderctrlkind: TStringField
      DisplayLabel = #25253#20215#31867#22411
      FieldName = 'ctrlkind'
      Size = 10
    end
    object cdsTraderproductid: TIntegerField
      FieldName = 'productid'
    end
    object cdsTraderunitid: TIntegerField
      FieldName = 'unitid'
    end
    object cdsTraderqty: TFloatField
      DisplayLabel = #35746#36141#25968#37327
      FieldName = 'qty'
    end
    object cdsTraderp_name: TWideStringField
      DisplayLabel = #36135#21697#21517#31216
      FieldName = 'p_name'
      Size = 60
    end
    object cdsTraderp_code: TStringField
      DisplayLabel = #36135#21697#32534#30721
      FieldName = 'p_code'
      Size = 30
    end
    object cdsTraderunitname: TWideStringField
      DisplayLabel = #21333#20301
      FieldName = 'unitname'
      Size = 30
    end
    object cdsTradert_name: TWideStringField
      DisplayLabel = #20379#24212#21830#21517#31216
      FieldName = 't_name'
      Size = 80
    end
    object cdsTradert_code: TWideStringField
      DisplayLabel = #20379#24212#21830#32534#30721
      FieldName = 't_code'
      Size = 40
    end
    object cdsTraderprice: TFloatField
      DisplayLabel = #37319#36141#20215
      FieldName = 'price'
    end
    object cdsTraderckind: TIntegerField
      FieldName = 'ckind'
    end
    object cdsTradertraderid: TIntegerField
      FieldName = 'traderid'
    end
    object cdsTradermoneyid: TIntegerField
      FieldName = 'moneyid'
    end
    object cdsTradermoneyname: TStringField
      FieldName = 'moneyname'
      Size = 60
    end
    object cdsTraderexchrate: TFloatField
      FieldName = 'exchrate'
    end
    object cdsTraderdcprice: TFloatField
      FieldName = 'dcprice'
    end
  end
end
